package cn.gs;

import cn.gs.service.AopDemoServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class main {

    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("aspects.xml");

        AopDemoServiceImpl aopDemoService = context.getBean("demoService",AopDemoServiceImpl.class);

        aopDemoService.doMethod1();
        aopDemoService.doMethod2();
        try {
            aopDemoService.doMethod3();
        } catch (Exception e) {
           // e.printStackTrace();
        }

    }
}
